<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <style>
      .container {
        height: 200px;
        line-height: 200px;
        text-align: center;
        display: table;
        table-layout: fixed;
        width: 100%;
      }
      .left,
      .right,
      .main {
        display: table-cell;
      }
      .left,
      .right {
        width: 100px;
        background: green;
      }
      .main {
        background: black;
        color: white;
        width: 100%;
      }
    </style>
    <div class="container">
      <div class="left">左边固定宽度</div>
      <div class="main">中间⾃适应</div>
      <div class="right">右边固定宽度</div>
    </div>
  </body>
</html>
